how to solve java datatypes on hackerrank